import { getAction, deleteAction, putAction, postAction } from '@/api/manage'

// 客户管理
const customerList = (params) => getAction('/crm/customer/list', params)
const customerAdd = (params) => postAction('/crm/customer/add', params)
const customerEdit = (params) => putAction('/crm/customer/edit', params)
const customerDelete = (params) => deleteAction('/crm/customer/delete', params)
const customerDeleteBatch = (params) => deleteAction('/crm/customer/deleteBatch', params)
const customerExport = '/crm/customer/exportXls'
const customerImport = '/crm/customer/importExcel'

// 客户联系人
const contactList = (params) => getAction('/crm/contact/list', params)
const contactAdd = (params) => postAction('/crm/contact/add', params)
const contactEdit = (params) => putAction('/crm/contact/edit', params)
const contactDelete = (params) => deleteAction('/crm/contact/delete', params)

// 工程项目
const projectList = (params) => getAction('/crm/project/list', params)
const projectAdd = (params) => postAction('/crm/project/add', params)
const projectEdit = (params) => putAction('/crm/project/edit', params)
const projectDelete = (params) => deleteAction('/crm/project/delete', params)
const projectDeleteBatch = (params) => deleteAction('/crm/project/deleteBatch', params)
const projectByCustomer = (params) => getAction('/crm/project/getByCustomerId', params)
const projectDetail = (params) => getAction('/crm/project/queryById', params)
const projectExport = '/crm/project/exportXls'
const projectImport = '/crm/project/importExcel'

export {
  customerList,
  customerAdd,
  customerEdit,
  customerDelete,
  customerDeleteBatch,
  customerExport,
  customerImport,
  contactList,
  contactAdd,
  contactEdit,
  contactDelete,
  projectList,
  projectAdd,
  projectEdit,
  projectDelete,
  projectDeleteBatch,
  projectByCustomer,
  projectDetail,
  projectExport,
  projectImport
}